﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace brand.cyt369.com.dal
{
    public class CarouselService: brand.cyt369.com.dal.DbContexts.BrandBaseService<CarouselService>
    {
        /// <summary>
        /// 获取轮播图
        /// </summary>
        /// <returns></returns>
        public IQueryable<brand.cyt369.com.models.Carousel> CarouselsGets()
        {
            using (var ctx = this.BrandCtx)
            {
                var carousels = (from o in ctx.Carousels
                                where o.Enable == true
                                select o);
                return carousels.ToList().AsQueryable();
            }
        }

    }
}
